package org.weishe.grandson;

import java.io.IOException;

import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

public class GrandsonMapper extends Mapper<Text, Text, Text, Text> {

	private Text ov = new Text();

	@Override
	protected void map(Text key, Text value, Mapper<Text, Text, Text, Text>.Context context)
			throws IOException, InterruptedException {
		ov.set(value.toString() + "_" + 1);
		context.write(key, ov);
		ov.set(key.toString() + "_" + 2);
		context.write(value, ov);
	}

}
